From bb44bead1012120e08e81ce206612618384481de Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 23 Nov 2007 16:22:36 +0000 Subject: [PATCH] [Mini-OS] Fix stack closures So as to make backtracing tools happy, correctly close x86 stacks for new threads as well as on callback in the x86_32 case since there is no unwind marker. Signed-off-by: Samuel Thibault --- extras/mini-os/arch/x86/x86_32.S | 3 +++ extras/mini-os/arch/x86/x86_64.S | 2 ++ 2 files changed, 5 insertions(+) diff --git a/extras/mini-os/arch/x86/x86_32.S b/extras/mini-os/arch/x86/x86_32.S index b6f1be3a01..2d359ab44a 100644 --- a/extras/mini-os/arch/x86/x86_32.S +++ b/extras/mini-os/arch/x86/x86_32.S @@ -126,6 +126,7 @@ ENTRY(hypervisor_callback) cmpl $ecrit,%eax jb critical_region_fixup 11: push %esp + xorl %ebp,%ebp call do_hypervisor_callback add $4,%esp movl HYPERVISOR_shared_info,%esi @@ -281,6 +282,8 @@ ENTRY(spurious_interrupt_bug) ENTRY(thread_starter) popl %eax popl %ebx + pushl $0 + xorl %ebp,%ebp pushl %eax call *%ebx call exit_thread diff --git a/extras/mini-os/arch/x86/x86_64.S b/extras/mini-os/arch/x86/x86_64.S index 1b5e0f7b37..0f85577716 100644 --- a/extras/mini-os/arch/x86/x86_64.S +++ b/extras/mini-os/arch/x86/x86_64.S @@ -380,6 +380,8 @@ ENTRY(page_fault) ENTRY(thread_starter) popq %rdi popq %rbx + pushq $0 + xorq %rbp,%rbp call *%rbx call exit_thread -- 2.30.2